<link href="/assets/home/css/myycenter.css" rel="stylesheet" />
<!-- 头部 -->
<div class="top_div">
    <img src="/assets/home/images/bac.jpg" class="top_img">
    <div class="userInfo">
        <a href="./personal-data.html">
            <img class="uPic" src="{$LoginUser['avatar_text']}" />
        </a>
        <p class="uBalance">{$LoginUser['nickname']}</p>
    </div>
</div>

<!-- 菜单 -->
<div class="weui-panel" style="margin-top: 0;">
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="{:url('home/business/profile')}">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/information.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>我的资料</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="{:url('home/business/order')}">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/order.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>我的订单</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="{:url('home/business/record')}">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/order.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>消费记录</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="./recharge.html">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/recharge.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>充值</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="{:url('home/business/contact')}">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/lianxi.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>联系我们</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <a class="weui-cell weui-cell_access" href="javascript:void(0)" id="logout">
                    <div class="weui-cell__hd">
                        <img src="/assets/home/images/logout.png" alt="">
                    </div>
                    <div class="weui-cell__bd weui-cell_primary">
                        <p>注销</p>
                    </div>
                    <div class="weui-cell__ft">
                        <img src="/assets/home/images/right.png" alt="">
                    </div>
                </a>
            </div>
        </div>
    </div>
</div>

<!-- 引入底部 -->
{include file='common/footer' /}
<script>
    $("#logout").click(function () {
        mui.confirm("确认是否退出登陆?", '退出登陆', ['确定', '取消'], function (e) {
            if (e.index == 0) {
                $.ajax({
                    type: "POST",
                    url: `{:url('home/index/logout')}`,
                    dataType: "JSON",
                    success: function (res) {
                        console.log(res)
                        if (res.code == 1) {
                            mui.toast('退出登陆成功', { duration: 'long', type: 'div' })
                            setTimeout(() => {
                                // 跳转
                                location.href = `{:url('home/index/login')}`
                            }, 1000)
                        }
                    }
                })

            }
        })
    })

</script>